
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type UserInvoiceRequest struct {

	Uid string `json:"uid" form:"uid"`

	HeaderType string `json:"header_type" form:"header_type"`

	Type string `json:"type" form:"type"`

	Name string `json:"name" form:"name"`

	DutyNumber string `json:"duty_number" form:"duty_number"`

	DrawerPhone string `json:"drawer_phone" form:"drawer_phone"`

	Email string `json:"email" form:"email"`

	Tell string `json:"tell" form:"tell"`

	Address string `json:"address" form:"address"`

	Bank string `json:"bank" form:"bank"`

	CardNumber string `json:"card_number" form:"card_number"`

	IsDefault string `json:"is_default" form:"is_default"`

	IsDel string `json:"is_del" form:"is_del"`

	AddTime string `json:"add_time" form:"add_time"`

}

func (r *UserInvoiceRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *UserInvoiceRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"uid": "required",

		"header_type": "required",

		"type": "required",

		"name": "required",

		"duty_number": "required",

		"drawer_phone": "required",

		"email": "required",

		"tell": "required",

		"address": "required",

		"bank": "required",

		"card_number": "required",

		"is_default": "required",

		"is_del": "required",

		"add_time": "required",

	}
}

func (r *UserInvoiceRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *UserInvoiceRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *UserInvoiceRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
